﻿using Microsoft.Xrm.Sdk;

namespace McTools.SolutionExtender.DuplicateDetectionRulePlugin
{
    /// <summary>
    /// Class that represents a condition for duplicate detection rule
    /// </summary>
    public class DuplicateDetectionCondition
    {
        #region PRoperties

        /// <summary>
        /// Gets or sets the base attribute for the condition rule
        /// </summary>
        public string BaseAttributeName{ get; set; }

        /// <summary>
        /// Gets or sets the secondary attribute for the condition rule
        /// </summary>
        public string MatchingAttributeName { get; set; }

        /// <summary>
        /// Gets or sets the operator code for the condition rule
        /// </summary>
        public OptionSetValue OperatorCode { get; set; }

        /// <summary>
        /// Gets or sets the operator parameter for the condition rule
        /// </summary>
        public int OperatorParam { get; set; }

        /// <summary>
        /// Gets or sets the reference to the duplicate detection rule
        /// </summary>
        public EntityReference RegardingObjectId { get; set; }

        public bool IgnoreBlankValues { get; set; }

        #endregion Properties
    }
}
